<?php
/* 
 * Amnesia is Copyright (c) 2010 Mark Russell
 * 
 * Contact: info@amnesia-app.com	
 * 
 * This file is part of Amnesia.
 * 
 * Amnesia is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Amnesia is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Amnesia. If not, see <http://www.gnu.org/licenses/>.
 *
 */

include '../../db/db.php';

$id = mysql_real_escape_string ($_POST[id]);
$user_id = mysql_real_escape_string ($_POST[user_id]);
$cat_name = mysql_real_escape_string ($_POST[cat_name]);

$query = "UPDATE `" . $cat_name . "` SET `live`=0 WHERE " . $cat_name . "_id=" . $id . " && `user_id`=" . $user_id;

if(!($result = @ mysql_query ($query, $con)))

mysql_close($con);
?>